/**
 * （时间处理）返回当前的时间格式，以及时间戳
 * @returns Object
 * String standard  国际标准时间格式
 * String format xxxx-xx-xxTxx:xx:xx.xxx
 * String formatCN xxxx年xx月xx日Txx时xx分xx.xxx秒
 * Number timestamp 当前时间戳
 */
function getDate() {
  const D = new Date();
  const y = D.getFullYear();
  const m = D.getMonth() + 1;
  const d = D.getDate();
  const hour = D.getHours();
  const mim = D.getMinutes();
  const sec = D.getSeconds();
  const mill = D.getMilliseconds();
  const timestamp = D.getTime();

  return {
    standard: D,
    format: `${y}-${m > 10 ? m : "0" + m}-${d > 10 ? d : "0" + d}T${hour > 10 ? hour : "0" + hour}:${
      mim > 10 ? mim : "0" + mim
    }:${sec > 10 ? sec : "0" + sec}.${mill}`,
    formatCN: `${y}年${m > 10 ? m : "0" + m}月${d > 10 ? d : "0" + d}日${hour > 10 ? hour : "0" + hour}时${
      mim > 10 ? mim : "0" + mim
    }分${sec > 10 ? sec : "0" + sec}秒${mill}毫秒`,
    timestamp,
  };
}
